﻿using System.Collections.Generic;
using System.Linq;
using Rated.DAL.Db;
//using Rated.Common.Classes;

namespace Rated.DAL.Repository
{
    public static class RatedItemRepository
    {
        public static RatedItem Get(int itemId)
        {
            var db = new RatedEntities();
            return db.RatedItems.Where(o => o.ID == itemId).Single();
        }

        public static List<RatedItem> GetAll(int memberId)
        {
            // We want to get all of the items for this member
            return new List<RatedItem>() { Get(1) };
            // get the item with ID of 1
        }



        public static List<RatedItem> Items(string domain)
        {
            var db = new RatedEntities();
            var result = db.RatedItems.Where(o => o.RatedItemType.Domain == domain).ToList();
            return result;
        }
    }
}
